import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Main from '../components/Main'
import Login from '../components/Login'
import Foo from '../components/Foo'
import NotFound from '../components/NotFound'

const Bar = { template: '<div>bar</div>' }

export default new Router({
  routes: [
    // {
    //   path: '/',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // },
    // {
    //   path: '/foo',
    //   name: 'foo',
    //   component: Foo
    // },
    {
      path: '/bar',
      // name: 'bar',
      component: Bar
    },
    {
      path: '/main',
      // name: 'main',
      component: Main,
      // props: true,
      children:[
        {
          path: '/foo/:id',
          name: 'foo',
          component: Foo,
          props: true
        },{
          path: "/goHome",
          redirect: "/main"
        }
      ]
    },
    {
      path: '/login',
      // name: 'login',
      component: Login
    },{
      path: '*',
      component: NotFound
    }
  ]
})
